package com.agp.context;


public class BaseContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    //设置当前用户id
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    //获取当前用户id
    public static Long getCurrentId() {
        return threadLocal.get();
    }

    //移除当前用户id
    public static void removeCurrentId() {
        threadLocal.remove();
    }
}
